import rxAjax from '@/assets/js/ajax.js';
import SysRoutingApi from "./sysRouting";

//路由类型 api接口
export const SysRouteTypeApi = {};

SysRouteTypeApi.baseUrl= '/api-system/system/core/sysRouteType';
SysRouteTypeApi.exportUrl= SysRouteTypeApi.baseUrl + '/listExport';

//查询列表
SysRouteTypeApi.query=function (parameter) {
  var url= SysRouteTypeApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
SysRouteTypeApi.get =function(pkId) {
  var url= SysRouteTypeApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//查询路由类型列表
SysRouteTypeApi.getRouteTypeList=function () {
  var url= SysRouteTypeApi.baseUrl + '/getList';
  return rxAjax.get(url);
}

//保存数据
SysRouteTypeApi.save =function(parameter) {
  var url= SysRouteTypeApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
SysRouteTypeApi.del =function(parameter) {
  var url= SysRouteTypeApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

export  default SysRouteTypeApi;

